import http from '@/util/http'

export function allTag () {
  return http.get('/tag/list')
}

export function delTag (id) {
  return http.delete(`/tags?id=${id}`)
}

export function repeatTag (params) {
  return http.get(`/tag/repeat?${params}`)
}

export function tagList (search, current, pageSize) {
  return http.post(`/tag/get?pageNo=${current}&pageSize=${pageSize}`, search)
}

export function addTag (data) {
  return http.post('/tags', data)
}

export function updateTag (data) {
  return http.put('/tags', data)
}
